using UnityEngine;
using System.Collections;

public class AtlasGanhou : MonoBehaviour 
{
    public static Texture2D globalTexture;
    public static Rect[] rects;
    private Texture2D[] textures;

    public static Material globalMaterial;

    void Awake()
    {
        textures = new Texture2D[3];
		
		this.textures[0] = ((Texture2D)Resources.Load("Textures/Ganhou/Ganhou"));
		this.textures[1] = ((Texture2D)Resources.Load("Textures/Instru/Menu"));
        this.textures[2] = ((Texture2D)Resources.Load("Textures/Ganhou/Tocha"));
		
        globalTexture = AtlasTexture.Create(this.textures, out rects);

        globalMaterial = new Material((Shader)Resources.Load("Shader/Basic2D"));
        globalMaterial.mainTexture = globalTexture;
    }
}
